<textarea cols="30" rows="5" id="fileAlt-{$item.fieldId}" >{$item.file.alt}</textarea>

<script type="text/javascript" src="modules/jquery.textareaCounter.js"></script>
<script type="text/javascript">
{literal}
var options = {
    'maxCharacterSize': 200,
    'originalStyle': 'originalTextareaInfo',
    'warningStyle' : 'warningTextareaInfo',
    'warningNumber': 20,
    'displayFormat' : '#input/#max | #words wyrazy/wyrazów'
};
{/literal}
$('#fileAlt-{$item.fieldId}').textareaCount(options);
    $('#dialog-{$item.fieldId}').dialog(
    {literal}
    {
        buttons: {
            "zapisz": function() {
    {/literal}
                    setFileAlt('{$item.fieldId}',{$item.file.id});
    {literal}
                    $( this ).dialog( "close" );
            }
        }
    });
    {/literal}
</script>
